import os
from datetime import datetime
from foftact.etf.ETF_MODEL import ETF_MODEL
from foftact.etf import etf_spot

# 将当前目录添加到Python搜索路径中
os.sys.path.append(os.path.dirname(os.path.abspath(__file__)))

funds_data = etf_spot.collect()

for column in funds_data.columns:
    print(f'column : {column}')

# 将 fund 填充进 etf 实例
for fund in funds_data.values:
    print(f'fund instance: {fund}')
    etf = etf_spot.transform(fund)
    print(f'ETF instance: {etf.to_dict()}')



